<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>宿舍信息管理</title>

	<meta name="decorator" content="default"/>
	
	<link type="text/css" rel="stylesheet" href="${ctxStatic}/css/dmsDormitoryForm.css" />
	<script type="text/javascript" src="${ctxStatic}/js/dmsStudentsList.js"></script>
	<script type="text/javascript" src="${ctxStatic}/layer/layer.js"></script>
	<script type="text/javascript" src="${ctxStatic}/js/dmsDormitoryForm.js"></script>
	
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
	
</head>
<body>
	<ul class="nav nav-tabs">
		<%--<li><a href="${ctx}/dormitory/dmsDormitory/">宿舍信息列表</a></li>--%>
		<li class="active"><a href="${ctx}/dormitory/dmsDormitory/form?id=${dmsDormitory.id}">宿舍信息<shiro:hasPermission name="dormitory:dmsDormitory:edit">${not empty dmsDormitory.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="dormitory:dmsDormitory:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="dmsDormitory" action="${ctx}/dormitory/dmsDormitory/save" method="post" class="form-horizontal">
	
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">楼号：</label>
			<div class="controls">
				<form:input path="floor" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="floorid" pattern="^[A-Z]$"/>
				<span class="help-inline"><font color="red" id="msg1">*</font></span>
				<span class="help-inline"><font>（楼号（如：A））</font> </span>
			</div>
		</div>
	
		<div class="control-group">
			<label class="control-label">宿舍号：</label>
			<div class="controls">
				<form:input path="dormitoryNumber" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="dormitoryNumberid" pattern="^[A-Z][0-9]{3}$"/>
				<span class="help-inline"><font color="red" id="msg2">*</font></span>
				<span class="help-inline"><font>（楼号+宿舍编号（如：A405））</font> </span>
			</div>
		</div>
		<div class="control-group x">
			<label class="control-label">床：</label>
			<div class="controls">
				<form:input path="bed" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="bedId"/>
				<span class="help-inline"><font color="red" id="msg3">*</font></span>
				<span class="help-inline"><font>（数目：（如：2））</font> </span>
			</div>
		</div>
		<div class="control-group ">
			<label class="control-label">空床位：</label>
			<div class="controls">
				<form:input path="roomBed" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="roomBedid"/>
				<span class="help-inline"><font color="red" id="msg8">*</font></span>
				<span class="help-inline"><font>（空床数小于床位数）</font> </span>
			</div>
		</div>
		<div class="control-group x">
			<label class="control-label">椅子：</label>
			<div class="controls">
				<form:input path="chair" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="chairid"/>
				<span class="help-inline"><font color="red" id="msg5">*</font></span>
				<span class="help-inline"><font>（费用+数目（如：200/4））</font> </span>
			</div>
		</div>
		<div class="control-group ">
			<label class="control-label">空调：</label>
			<div class="controls">
				<form:input path="airConditioning" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="airConditioningid"/>
				<span class="help-inline"><font color="red" id="msg6">*</font></span>
				<span class="help-inline"><font>（费用+数目（如：200/4））</font> </span>
			</div>
		</div>
		<div class="control-group x">
			<label class="control-label">洗衣机：</label>
			<div class="controls">
				<form:input path="washingMachine" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="washingMachineid"/>
				<span class="help-inline"><font color="red" id="msg7">*</font></span>
				<span class="help-inline"><font>（费用+数目（如：200/4））</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">桌子：</label>
			<div class="controls">
				<form:input path="desk" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="deskid"/>
				<span class="help-inline"><font color="red" id="msg4">*</font></span>
				<span class="help-inline"><font>（费用+数目（如：200/4））</font> </span>
			</div>
		</div>
		<div class="control-group x">
			<label class="control-label">电风扇：</label>
			<div class="controls">
				<form:input path="electricFan" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="electricFanid"/>
				<span class="help-inline"><font color="red" id="msg9">*</font></span>
				<span class="help-inline"><font>（费用+数目（如：200/4））</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">柜子：</label>
			<div class="controls">
				<form:input path="cabinet" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="cabinetid"/>
				<span class="help-inline"><font color="red" id="msg10">*</font></span>
				<span class="help-inline"><font>（费用+数目（如：200/4））</font> </span>
			</div>
		<br>	
		<div class="control-group">
			<label class="control-label">住宿费：</label>
			<div class="controls">
				<form:input path="fee" htmlEscape="false" maxlength="10" class="input-xlarge inputclass" id="feeid"/>
				<span class="help-inline"><font color="red" id="msg11">*</font></span>
				<span class="help-inline"><font>（输入三位数（如：300））</font> </span>
			</div>	
		</div>
		
		<!-- 表格 -->
		<%-- 
		<table class="father">
			<tr class="line">
				<td>楼号：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="10" class="input-xlarge inputclass"/>
				</td>
				<td class="space"></td>
				<td>楼层：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="5" class="input-xlarge inputclass"/>
				</td>
			</tr>
			<tr class="line">
				<td>宿舍号：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="2px" class="input-xlarge inputclass"/>
				</td>
				<td class="space"></td>
				<td>床：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="5" class="input-xlarge inputclass"/>
				</td>
			</tr>
			<tr class="line">
				<td>桌子：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="2px" class="input-xlarge inputclass"/>
				</td>
				<td class="space"></td>
				<td>椅子：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="5" class="input-xlarge inputclass"/>
				</td>
			</tr>
			<tr class="line">
				<td>空调：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="2px" class="input-xlarge inputclass"/>
				</td>
				<td class="space"></td>
				<td>洗衣机：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="5" class="input-xlarge inputclass"/>
				</td>
			</tr>
			<tr class="line">
				<td>房间床位：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="2px" class="input-xlarge inputclass"/>
				</td>
				<td class="space"></td>
				<td>电风扇：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="5" class="input-xlarge inputclass"/>
				</td>
			</tr>
			<tr class="line">
				<td>柜子：</td>
				<td>
					<form:input path="floor" htmlEscape="false" maxlength="5" class="input-xlarge inputclass"/>
				</td>
			</tr>
		</table>
		 --%>
		<!-- 表格 -->
		
		<div class="form-actions">
			<shiro:hasPermission name="dormitory:dmsDormitory:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>